<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <title>用js操作<progress>进度条</title>
</head>
<script>
    function button_onclick() {
        var progressBar = document.getElementById("p");
        for (var i = 0; i < 10; i++) {
            progressBar.value++;
        }
    }
</script>

<body>
    <p>完成百分比：<progress id="p" max="100" value="0"><span>0</span>%</progress></p>
    <input type="button" onclick="button_onclick();" value="请点击" />
    <!--注意在onlick中调用函数格式：
    函数名();       //括号和分号不要忘了
    -->

</body>

</html>